Repository navigation
test(devtools): plan snapshots for 32 small single-purpose workloads (#1278) - #1284
Conversation
d744bd7 to
bd3a333
Compare
|
The rebase onto main is clean, but regenerating on main changes 32 of the 33 new snapshots, and about 15
Two workloads need changes beyond their
Could you rewrite those The regenerated snapshots are on branch A separate small issue: |
e8c2135 to
abe9d57
Compare
|
Thanks. Rebased onto main |
…kloads (#1278) Each workload exercises one planner behavior: rollup across label sets, top-k reuse, chain widths and sharing, avg as Sum / Count, and which sketches an accuracy target or a declared value sign admits. Its `covers` line says what the workload exercises, not which plan is selected, so a plan change needs no rewording. Existing snapshots are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4GZoWwtfFWWr9CKkr
The KMV build's operations per row print to three decimals (116.19991733920547 -> 116.2). No plan changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014qhwq4GZoWwtfFWWr9CKkr
abe9d57 to
e317e20
Compare
Summary
Adds 32 small, single-purpose workloads to
sketch_plan_snapshots, each exercising one planner behavior. Closes #1278. Based onmain3f8fd295d(after #1417).Review guide
crates/devtools/tests/sketch_plan_snapshots/manifest.json: the 32 new entries. Eachcoverssays what the workload exercises (e.g.rollup-sum-chain: "sum by (job, host), by (job) and sum: rollups for sums"), not which plan is selected, so a plan change needs no rewording.crates/devtools/tests/sketch_plan_snapshots.rs: one header paragraph.workloads/*.jsonand<id>.jsonsnapshots are generated or copied; skim them.rollup-quantile-nested-labels,rollup-quantile-disjoint-labels,rollup-sum-chain,stddev-nested-labels,avg-nested-labels,sql-rollup-quantile-same-window,sql-rollup-quantile-different-windowstopk-5-and-10,topk-by-job-and-global,topk-5-and-10-accuracy,topk-rate-counter,topk-sum-count-over-time,topk-sum-count-over-time-accuracyquantile-over-time-phase-0,chains-10m-5m-3m-3m,chains-10m-5m-3m-10s,chains-10m-5m-3m-10s-mvp,sum-over-time-two-intervals,quantile-phase-0-and-30s,quantile-7m-every-5msum-avg-over-time-5m,sum-5m-avg-10m-over-time,mixed-quantilesdistinct-over-time-1pct,distinct-over-time-5pct,entropy-over-time,quantile-two-targets,distinct-two-forms,entropy-and-distinct,quantile-exact,sign-unknown,sign-non-negativeAll are on
data(10k gauge series, 15 s samples), mostly every 1m at phase 0, underraw_retained(one undermvp). The two SQL workloads useworkloads/sql-table-data.tables.json.Behavior: before → after
rollup-sum-chain(sum by (job, host) (data),sum by (job) (data),sum (data)):by (job)andsumaggregated from the(job, host)result. A change to rollup shows up as a diff of this file.Interfaces
None.
Algorithm changes
None.
Decisions and open questions
coversdescribes the workload, not the plan. Under the measured unit costs (fix(cost): charge each operation the executor's measured time, so a sketch plan is no longer predicted cheaper than a faster exact plan #1355, fix(cost): charge sketch states and merges, raw batch visits, grouping keys, distinct counts and KMV at their measured costs, so the measured-best plan is selected #1363) many of these workloads select exact plans (for example the quantile chains and the sign pair); the snapshots record that, and thecoverslines stay true when it changes.quantile-over-time-no-phase:fixed_intervalno longer exists onmain(asap_planner: Pass 2 builds no tumbling windows for fixed_interval without evaluation_phase #1260), and with a phase it duplicatesquantile-over-time-phase-0.Verification
UPDATE_SNAPSHOTS=1 cargo test --release -p asap-devtools --test corpus_snapshots -- --ignored sketch_plans_match_snapshotson3f8fd295d, thencargo test --release -p asap-devtools --test corpus_snapshots -- --include-ignored: 8 passed.main's current plans. The second commit regeneratesdistinct-two-formsafter fix(cost): print a summary build's operation counts to three decimals #1417 (116.19991733920547 ops→116.2 ops, text only).Follow-ups
🤖 Generated with Claude Code
https://claude.ai/code/session_014qhwq4GZoWwtfFWWr9CKkr